home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Borland Plateform / Turbo Prolog 2 / EXAMPL41.PRO < prev    next >
Encoding:
Prolog Source  |  1986-04-23  |  463 b   |  17 lines

  1.                 /* Program 41 */
  2. predicates
  3.     piano
  4.     tone(char,integer)
  5. goal
  6.     piano.
  7. clauses
  8.     piano:-
  9.         readchar(Note),tone(Note,Freq),sound(5,Freq),piano.
  10.  
  11.     tone('a',131).  tone('w',139).  tone('s',147).
  12.     tone('d',165).  tone('e',156).  tone('f',175). 
  13.     tone('t',185).  tone('g',196).  tone('y',208).  
  14.     tone('h',220).  tone('u',233).  tone('j',247).  
  15.     tone('k',262).
  16.     tone(_,5000). /*all other keys squeak */
  17.